export const schemaExample = {
  routeName: 'demo',
  menuName: '菜单名称',
  formColumns: 1,
  fields: [
    { name: 'name', title: 'Name', type: 'text', editDisabled: true },
    {
      name: 'createTime',
      title: '创建时间',
      type: 'datetime',
    },
    {
      name: 'createUserID',
      title: '创建人',
      type: 'select',
      hideInColumn: true,
      data: 'select Id as value,UserName as title from [User]',
    },
    {
      name: 'deleteFlag',
      title: '状态',
      type: 'switch',
      hideInForm: true,
      data: "select Code as value,Name as title from ItemList where TypeCode='DataStatus'",
    },
  ],
  listAction: [
    {
      title: '编辑',
      type: 'primary',
      action: 'modal',
      uri: '/api/demo/info/:id',
      method: 'get',
    },
    {
      title: '页编辑',
      type: 'default',
      action: 'page',
      uri: '/api/demo/info/:id',
      method: 'get',
    },
    {
      method: 'post',
      title: '删除',
      type: 'danger',
      action: 'delete',
      uri: '/api/demo/disable',
    },
  ],
  addAction: [
    {
      title: '重置',
      type: 'dashed',
      method: 'get',
    },
    {
      title: '取消',
      type: 'default',
      action: 'cancel',
      method: 'get',
    },
    {
      title: '保存',
      type: 'primary',
      action: 'submit',
      uri: '/api/demo/save',
      method: 'post',
    },
  ],
  editAction: [
    {
      title: '重置',
      type: 'dashed',
      method: 'get',
    },
    {
      title: '取消',
      type: 'default',
      action: 'cancel',
      method: 'get',
    },
    {
      title: '保存',
      type: 'primary',
      action: 'submit',
      uri: '/api/demo/save',
      method: 'post',
    },
  ],
  tableToolbar: [
    {
      title: '新增',
      type: 'primary',
      action: 'modal',
      uri: '/api/demo/info/0',
      method: 'get',
    },
    {
      title: '导出',
      type: 'default',
      action: 'exportXls',
      uri: '/api/demo',
      method: 'post',
    },
    {
      title: '刷新',
      type: 'dashed',
      action: 'reload',
      method: 'get',
    },
  ],
  batchToolbar: [
    {
      title: '删除',
      type: 'danger',
      action: 'delete',
      uri: '/api/demo/disable',
      method: 'post',
    },
  ],
  batchToolbarTrashed: [
    {
      title: '彻底删除',
      type: 'danger',
      action: 'deletePermanently',
      uri: '/api/demo/delete',
      method: 'post',
    },
    {
      title: '恢复',
      type: 'default',
      action: 'restore',
      uri: '/api/demo/restore',
      method: 'post',
    },
  ],
};
